Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 4 - Colors and Color-Related Objects / Colors and Color-Related Objects Reference
Color Functions /


GXCombineColor

You can use the GXCombineColor function to combine two colors with a transfer mode to get a result color for testing, without actually drawing.

gxColor *GXCombineColor(gxColor *target, gxInk operand);
target
A pointer to the target color, which represents the destination color for drawing. On return, target points to the result color.
operand
A reference to an ink object, which represents the source color and the transfer mode for drawing.
function result
A pointer to the result color.
DESCRIPTION
The GXCombineColor function lets you preview or predict the results of drawing without actually carrying out a drawing operation. The function applies the color and transfer mode of the ink object referenced in the operand parameter to the color specified in the target parameter. It calculates the result of drawing, with the ink's color as the source color and the target color as the destination color.

GXCombineColor modifies the target color to reflect the operation and also returns a pointer to the resulting color. If target or operand is nil, the function posts an error and returns nil.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
ink_is_nil 
color_is_nil 
colorSpace_out_of_range(debugging version)
invalid_transferMode_colorSpace(debugging version)
Warnings 
colorSet_index_out_of_range 
SEE ALSO
Ink objects and transfer modes for drawing are described in the chapter "Ink Objects" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996